<template>
	<view >
		<u-popup v-model="WechatCodeShow" mode="center" width="516rpx" height="608rpx" border-radius="16" :mask-close-able="false">
			<view class="WechatCode">
				<view class="title">
					{{title}}
				</view>
				<view class="main" @click.stop="$PREVIEW_IMAGE(code)">
					<image :src="code" mode="" class="uimg"></image>
					<view class="size">
						{{content}}
					</view>
				</view>
				<view class="weChatfoot">
					<view class="btn1" @click="sure">
						关闭
					</view>
					<view class="weChatbtn2" @click="save">
						{{btn}}
					</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default{
		props: {
			WechatCodeShow:{
				type: Boolean,
				default: false,
				required: true
			},
			code:{
				type: String,
				default: "",
				required: true
			},
			title:{
				type: String,
				default: "",
				required: true
			},
			btn:{
				type: String,
				default: "",
				required: true
			},
			content:{
				type: String,
				default: "",
				required: true
			}
		},
		data(){
			return{
				
			}
		},
		methods:{
			save(){
				this.$emit('save')
			},
			sure(){
				this.$emit('sure')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.WechatCode{
		width: 516rpx;
		height: 608rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		overflow: hidden;
		.title{
			width: 100%;
			height: 92rpx;
			background: #f6f6f6;
			border-radius: 16rpx 16rpx 0rpx 0rpx;
			font-size: 32rpx;
			font-family: PingFang SC, PingFang SC-Bold;
			font-weight: 700;
			color: #000000;
			display: flex;
			align-items: center;
			justify-content: center;
		}
		.main{
			flex: 1;
			display: flex;
			flex-direction: column;
			align-items: center;
			padding-top: 40rpx;
			margin-bottom: 24rpx;
			width: 100%;
			.uimg{
				width: 298rpx;
				height: 298rpx;
				border-radius: 16rpx;
				margin-bottom: 20rpx;
			}
			.size{
				font-size: 28rpx;
				font-family: PingFang SC, PingFang SC-Medium;
				font-weight: 500;
				text-align: center;
				color: #333333;
			}
		}
		.weChatfoot{
			display: flex;
			align-items: center;
			justify-content: space-around;
			width: 100%;
			padding: 0 0 32rpx;
			.btn1{
				width: 198rpx;
				height: 68rpx;
				background: #f6f6f6;
				border-radius: 16rpx;
				font-size: 28rpx;
				font-family: PingFang SC, PingFang SC-Medium;
				font-weight: 500;
				text-align: center;
				color: #000000;
				display: flex;
				align-items: center;
				justify-content: center;
			}
			.weChatbtn2{
				width: 198rpx;
				height: 68rpx;
				background: #73F0EA;
				border-radius: 16rpx;
				font-size: 28rpx;
				font-family: PingFang SC, PingFang SC-Medium;
				font-weight: 500;
				color: #ffffff;
				display: flex;
				align-items: center;
				justify-content: center;
			}
		}
	}
</style>